package org.extdev.connection.ltr;

import org.extdev.connection.Connection;
import org.extdev.libraries.ltr.LTR212APILibraryFacade;
import org.extdev.libraries.ltr.LTRException;


/**
 * 
 * @author LAP
 *
 */
public abstract class LTR212LibConnection implements Connection{	
	private LTR212APILibraryFacade facade;
	
	public LTR212LibConnection(LTR212APILibraryFacade facade) throws LTRException {
		this.facade = facade;
	}
	
	@Override
	public void connect() throws LTRException {
		facade.openLTR212();
	}
	
	@Override
	public void disconnect() throws LTRException {
		facade.closeLTR212();
	}

	@Override
	public boolean isConnected() {
		return facade.isOpened();
	}
}
